package com.guigu.tms.base.controller;

import com.github.pagehelper.PageInfo;
import com.guigu.tms.base.service.IPdTransportLineTypeService;
import com.guigu.tms.commons.entity.base.PdTransportLineType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 线路类型表 前端控制器
 * </p>
 *
 * @author wj
 * @since 2022-09-26
 */
@RestController
@RequestMapping("/pdTransportLineType")
public class PdTransportLineTypeController {

    @Autowired
    IPdTransportLineTypeService iPdTransportLineTypeService;

   @PostMapping("/findTransportLineType")
   public PageInfo<PdTransportLineType> findTransportLineType(@RequestBody Map<String, String> map){
       return iPdTransportLineTypeService.findTransportLineTypeList(map);
   }

   @PostMapping("/AddTransportLineType")
   public int AddTransportLineType(@RequestBody PdTransportLineType pdTransportLineType){
       return iPdTransportLineTypeService.AddTransportLineType(pdTransportLineType);
   }

   @PutMapping("/UpdateTransportLineType")
    public int UpdateTransportLineType(@RequestBody PdTransportLineType pdTransportLineType) {
        return iPdTransportLineTypeService.UpdateTransportLineType(pdTransportLineType);
    }

    @DeleteMapping("/DeleteTransportLineTypeByid")
    public int DeleteTransportLineTypeByid(@RequestParam String id){
        return iPdTransportLineTypeService.DeleteTransportLineTypeByid(id);
    }

}
